package cn.itlaobing.eshop.web.filter;

import cn.itlaobing.eshop.web.filter.sitemeshtag.CssJsTag;
import org.sitemesh.builder.SiteMeshFilterBuilder;
import org.sitemesh.config.ConfigurableSiteMeshFilter;

import javax.servlet.annotation.WebFilter;

/**
 * Created by IT-XuGeek on 2017/11/13.
 */
@WebFilter("/*")
public class SiteMeshFilter extends ConfigurableSiteMeshFilter{
    @Override
    protected void applyCustomConfiguration(SiteMeshFilterBuilder builder) {
        builder.addDecoratorPath("/**","/WEB-INF/views/layout/application.jsp")
                .addExcludedPath("/asserts/**")
                .addTagRuleBundle(new CssJsTag());
    }


}
